home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / getrpcent.z / getrpcent
Encoding:
Text File  |  1998-10-20  |  7.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. GGGGEEEETTTTRRRRPPPPCCCCEEEENNNNTTTT((((3333RRRR))))                                                    GGGGEEEETTTTRRRRPPPPCCCCEEEENNNNTTTT((((3333RRRR))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      getrpcent, getrpcent_r, fgetrpcent, fgetrpcent_r, getrpcbyname,
  10.      getrpcbyname_r, getrpcbynumber, getrpcbynumber_r - get RPC entry
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<nnnneeeettttddddbbbb....hhhh>>>>
  14.  
  15.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppcccceeeennnntttt((((vvvvooooiiiidddd))));;;;
  16.  
  17.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppcccceeeennnntttt____rrrr((((ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****rrrreeeennnntttt,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffssssiiiizzzzeeee))));;;;
  18.  
  19.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ffffggggeeeettttrrrrppppcccceeeennnntttt((((FFFFIIIILLLLEEEE ****ffff))));;;;
  20.  
  21.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppcccceeeennnntttt____rrrr((((FFFFIIIILLLLEEEE ****ffff,,,, ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****rrrreeeennnntttt,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffssssiiiizzzzeeee))));;;;
  22.  
  23.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppccccbbbbyyyynnnnaaaammmmeeee((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee))));;;;
  24.  
  25.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppccccbbbbyyyynnnnaaaammmmeeee____rrrr((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****rrrreeeennnntttt,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffssssiiiizzzzeeee))));;;;
  26.  
  27.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppccccbbbbyyyynnnnuuuummmmbbbbeeeerrrr((((iiiinnnntttt nnnnuuuummmmbbbbeeeerrrr))));;;;
  28.  
  29.      ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****ggggeeeettttrrrrppppccccbbbbyyyynnnnuuuummmmbbbbeeeerrrr____rrrr((((iiiinnnntttt nnnnuuuummmmbbbbeeeerrrr,,,, ssssttttrrrruuuucccctttt rrrrppppcccceeeennnntttt ****rrrreeeennnntttt,,,, cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffssssiiiizzzzeeee))));;;;
  30.  
  31.      vvvvooooiiiidddd sssseeeettttrrrrppppcccceeeennnntttt((((iiiinnnntttt ssssttttaaaayyyyooooppppeeeennnn))));;;;
  32.  
  33.      vvvvooooiiiidddd eeeennnnddddrrrrppppcccceeeennnntttt((((vvvvooooiiiidddd))));;;;
  34.  
  35. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  36.      _G_e_t_r_p_c_e_n_t, _g_e_t_r_p_c_b_y_n_a_m_e, _g_e_t_r_p_c_b_y_n_u_m_b_e_r and their reentrant counterparts
  37.      each return a pointer to an object with the following structure
  38.      containing the broken-out fields of a line in the Sun RPC program number
  39.      data base, /_e_t_c/_r_p_c, or some other back-end database.
  40.  
  41.      struct    rpcent {
  42.           char *r_name;  /* name of server for this rpc program */
  43.           char **r_aliases;   /* alias list */
  44.           long r_number; /* rpc program number */
  45.      };
  46.  
  47.      The members of this structure are:
  48.  
  49.      r_name       The name of the server for this rpc program.
  50.  
  51.      r_aliases    A zero terminated  list  of  alternate  names  for  the  rpc
  52.                   program.
  53.  
  54.      r_number     The rpc program number for this service.
  55.  
  56.      _G_e_t_r_p_c_e_n_t reads the next line of the file, opening the file if necessary.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. GGGGEEEETTTTRRRRPPPPCCCCEEEENNNNTTTT((((3333RRRR))))                                                    GGGGEEEETTTTRRRRPPPPCCCCEEEENNNNTTTT((((3333RRRR))))
  71.  
  72.  
  73.  
  74.      _S_e_t_r_p_c_e_n_t opens and rewinds the file.  If the _s_t_a_y_o_p_e_n flag is  non-zero,
  75.      the net data base will not be closed after each call to _g_e_t_r_p_c_e_n_t (either
  76.      directly, or indirectly through one of the other "getrpc" calls).
  77.  
  78.      _E_n_d_r_p_c_e_n_t closes the file.
  79.  
  80.      _G_e_t_r_p_c_b_y_n_a_m_e and _g_e_t_r_p_c_b_y_n_u_m_b_e_r sequentially search from the beginning of
  81.      the file until a matching rpc program name or program number is found, or
  82.      until EOF is encountered.
  83.  
  84.      The fgetrpcent and fgetrpcent_r routines will return the next line in the
  85.      supplied stream broken out into a struct rpcent structure.
  86.  
  87.      The routines getrpcent, fgetrpcent, getrpcbyname and  getrpcbynumber  all
  88.      return  results  in  static  memory  which  is  overwritten on each call.
  89.      Reentrant versions of each of these routines  getrpcent_r,  fgetrpcent_r,
  90.      getrpcbyname_r and getrpcbynumber_r which parse the results into supplied
  91.      memory.  They each take three extra arguments,  a  pointer  to  a  struct
  92.      rpcent  structure,  a pointer to a character buffer, and a length for the
  93.      buffer.
  94.  
  95. NNNNOOOOTTTTEEEE
  96.      The routines documented in this manual entry only parse files of the
  97.      format given in rpc(4).  Data from other sources can be supplied to these
  98.      routines as files by the nsd(1M) daemon as specified in the nsd
  99.      configuration file /_e_t_c/_n_s_s_w_i_t_c_h._c_o_n_f.
  100.  
  101.      The Mips ABI specifies nothing but local files so applications which wish
  102.      to use anything else must compile with libc prior to libnsl in the
  103.      library list.
  104.  
  105.      When nsd is running changes to the local rpc file may not be noticed by
  106.      getrpcent() until the enumeration cache file has timed out.
  107.  
  108. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  109.      All functions that return struct rpcent * will return a null (0) pointer
  110.      in the case of EOF or failure.
  111.  
  112. FFFFIIIILLLLEEEESSSS
  113.      /etc/rpc /etc/nsswitch.conf /var/ns/cache/rpc.byname.m
  114.      /var/ns/cache/rpc.bynumber.m
  115.  
  116. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  117.      nsd(1M), rpc(4), rpcinfo(1M)
  118.  
  119. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  120.      A NULL pointer is returned on EOF or error.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.